package com.itheima.d1_inner_class1;

public class Outer {
    //内部类
    private int age =99;
    public static String a = "abc";

    public class Inner{
        private String name;
        public static String scoolName;
        private int age =88;

        public void test(){
            System.out.println("内部类的方法");
            int age =66;
            System.out.println(age);
            System.out.println(this.age);
            System.out.println(Outer.this.age);

        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public static String getScoolName() {
            return scoolName;
        }

        public static void setScoolName(String scoolName) {
            Inner.scoolName = scoolName;
        }
    }

    public void test2(){
        System.out.println("外部类的方法");
        System.out.println(age);
        System.out.println(a);
    }
}
